package com.open.capacity.common.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 作者 owen
 * @version 创建时间：2017年11月12日 上午22:57:51
 * 类说明 用户实体
 */
@Data
@TableName("stt_administrators")
@EqualsAndHashCode(callSuper=true)
public class SttUser  extends Model<SttUser>  implements Serializable {

    private static final long serialVersionUID = -5886012896705137070L;
    @TableId(value="straid",type=IdType.ASSIGN_ID)  //雪花算法  id生成策略
    @JsonSerialize(using=ToStringSerializer.class)
    private Long id;
    @TableField(value = "number")
    private String username;
    @TableField(value = "passwd")
    private String password;
    @TableField(value="stname")
    private String nickname;
    @TableField(value="struri")
    private String headImgUrl;
    @TableField(value="phones")
    private String phone;
    @TableField(value="gender")
    private Integer sex;
    @TableField(value="enable")
    private Boolean enabled;
    @TableField(value="crtime")
    private Date createTime;
    @TableField(value="uptime")
    private Date updateTime;
    private String remark;


    @TableField(exist=false)
    private List<SttRole> roles;

    @TableField(exist=false)
    private String roleId;

    @TableField(exist=false)
    private String oldPassword;
    @TableField(exist=false)
    private String newPassword;

}
